package lormi.meipin.dao;


import org.apache.ibatis.annotations.Param;

import lormi.meipin.entity.Member;
import org.springframework.stereotype.Repository;

@Repository
public interface MemberMapper {

	/**
	 * 插入数据
	 * @param record
	 * @return
	 */
    int insert(Member record);

    /**
     * 通过Id查询
     * @param id
     * @return
     */
    Member selectByPrimaryKey(Integer id);
    
    /**
     * 通过用户ID和用户类型查询
     * @param id
     * @param type
     * @return
     */
    Member selectByIdAndUserType(@Param("id") Integer id, @Param("type") Integer type);
    
    /**
     * 更新数据
     * @param record
     * @return
     */
    int updateByPrimaryKey(Member record);
    
    /**
     * 通过手机号查询
     * @param phone
     * @return
     */
    Member selectByPhone(@Param("phone") String phone);
    
}